﻿using System;
using System.Net;
namespace HBase {
    public abstract class ZtTaskConnect :ZtTask {
        public String ip;
        public int port;
        protected IPEndPoint ipEndPoint;
        public ZtTaskConnect() : base() {
            time = 3000;
        }
        protected override bool onlyOneTimeAsync() {

            return true;
        }
        protected String[] ports;
        public override bool excute() {
            bool re = reConnect();

            return re;
        }

        protected abstract bool reConnect();
        protected override bool init() {
            base.init();
            IPAddress addr = IPAddress.Parse(ip);
            ipEndPoint = new IPEndPoint(addr ,port);
            return true;
        }
    }
}
